from django.conf.urls import patterns, url
from django.contrib.auth.views import login
from messages import LOGIN_TEMPLATE_NAME, MESSAGES_LOGIN_REDIRECT_FIELD_NAME


urlpatterns = patterns('messages.views.main',
	url(r'^$', 'index'),
	url(r'^(?P<message_id>\d+)/$', 'detail'),
	url(r'^nova/$', 'new', name="new_message"),
	url(r'^login/$', login, {'template_name' : LOGIN_TEMPLATE_NAME,
		'redirect_field_name' : MESSAGES_LOGIN_REDIRECT_FIELD_NAME}, name="login"),
)
